cmake_minimum_required(VERSION 3.15)

# add_subdirectory的参数是子cmake文件所在的目录
# cmake父目录的内容可以供字目录使用
# 字目录的变量不能被父目录使用
# 类似父类和子类
project(text)
set(HEADPATH ${PROJECT_SOURCE_DIR}/include)
set(LIBPATH ${PROJECT_SOURCE_DIR}/lib)
set(BINPATH ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_CXX_STANDARD 11)
set(CALC_LIB calc)
set(SORT_LIB sort)
set(APP1 app1)
set(APP2 app2)
add_subdirectory(sort)
add_subdirectory(text1)
add_subdirectory(text2)
add_subdirectory(calc)